PCx PC Emulator Tips

By Hercules (Technical Editor)
DISCLAIMER (LEGAL RAMBLINGS):

I, Craig Daines, will NOT be held responsible for any inaccuracies in this document or by damages to hardware, software or otherwise as a result of incorrect installation procedures herein. You do so at your own risk.

This document has been provided exclusively for THE CRYPT Disk Magazine, and is NOT to be included on similar discs, nor shall it be edited in any shape or form without my prior permission.

COPYRIGHT VIOLATION:

Please bear in mind, that you MUST own the original MS-DOS and Windows installation discs to install it on your machine, otherwise you will be violating copyright laws.

ABOUT:

These screengrabs show you my Amiga emulating a PC courtesy of PCx PC Emulator. I am running MSDOS 6.22 and Windows 3.1 with AmigaOS 3.5 multi-tasking in the background !

In this article, I shall be discussing how you too can set up Microcode Solution's PCx PC emulator on your Amiga, and how to install MS-DOS and Windows so you can emulate a stock 386 PC on your Amiga. You may find the *full* commercial version of PCx on Amiga Format CD-ROM 50.

TRANSFERRING DOS AND WINDOWS TO YOUR AMIGA:

Installation was a nightmare: It's a hell of a lot easier if you have a Cat Weasel high-density disk controller and high density drive for reading high-density PC disks under PC emulation, since this way, you can simply install MS-DOS and Windows 3.1 straight from the installation disks.

Since I don't have a high density drive for installing MS-DOS or Windows, I got a friend to copy my MSDOS 6.22 and Windows installation disks into two drawers called 'DOS' and 'WIN' respectively onto a PC formatted zip disk which I could then read on the Amiga.

There are other options you can use to get the MS-DOS and Windows installation discs transferred to your Amiga as well if you don't have a high density drive.

1) You could ask a friend with a CD writer to put all your MS-DOS discs into a drawer called 'DOS' and all the Windows files into a drawer called 'WIN' and burn both drawers straight onto a CDR. Which you can then read via your CD-ROM drive.

2) Alternatively, you can use a piece of software called 'PC2Amiga'. PC2Amiga is mounted via a DOSDriver on the Amiga side, and the PC2Amiga executable you need to launch on the PC. PC2Amiga then 'enslaves' the PC it is networked to and allows a PC and Amiga to be networked via their parallel ports. You can even access the PC floppy drives and hard drive partitions from the Amiga, and whatis more it's free ! I've used PC2Amiga on numerous occasions for transferring files from my friends PC laptop to the Amiga using a pre-made laplink cable. It's a little slow, but it does the job nicely.

WHERE YOU CAN FIND THE FULL VERSION OF PCX:

The FULL version of PCx v1.1 was included on Amiga Format CD-ROM 50. Alternatively, if you would like to purchase the LATEST version of PCx priced at �29.99 + 1 postage and packing then I suggest you give our sponsors, WEIRD SCIENCE a ring who will be happy to take your order (please telephone prior to ordering to check stocks and availability). When ordering any software from our sponsors, please remember to mention you noticed their Software advertisement in THE CRYPT...

CONFIGURING PCX:

Once PCx is installed, you need to set it up. This as done as follows:-

1) Change PCx's cycle gadget so it display's the 'Memory' option. If your using 32-bit Fast-memory (an Amiga equipped with an 020,030,040 or 060 processor), then select 32-bit memory in PCx's memory window. If your only using an old Amiga fitted with a 68000 processor, you need to select 'Chip Memory' via PCx's memory window.

2) Change PCx's cycle gadget so it display's the 'Video' option. If you are using an Amiga with AGA chipset (A1200, A4000 then select the VGA_AGA driver). If you own an older Amiga which does not have the AGA chipset, then select VGA for the display driver.

3) Change PCx's cycle gadget so it displays the 'Floppy' option. Configure Amiga drives DF0: and DF1 (if you have an external drive) to PC drives A: and B:

4) Change PCx's cycle gadget so it displays 'Devices'. You will see two listers one which displays 'Useable Devices', the other 'Selected Devices' (which at present will be empty). AT THIS POINT, DO NOT CLICK ON ANY OF YOUR AMIGA PARTITIONS IN THE USABLE DEVICES LISTER OTHERWISE YOU WILL LOSE EVERYTHING ON THAT PARTITION. Instead we will use a HardDiskFile. Click on 'HardFileSetup', and type in a size in megabytes how large you would like your C: drive to be (40 megabytes is ample for a full installation of MS-DOS and Windows 3.1). Now, Click on 'Create'. PCx will now generate your hardiskfile for drive C: (a file called 'MSHardFile0' will be created in PCx's HardFile drawer). Do the same again, to create a second hardfile for drive D: as you did for drive C: (a file called 'MSHardFile1' will be created in PCx HardFile drawer.

Once this is complete, in the 'Useable Devices' window, click firstly on MSHardFile0 and then on MSHardFile1. Both hard disk files will now appear in PCx's 'selected devices' window (they will have an asterisk "*" next to them. Now your hardfiles have been created it's onto step 5...

5) Change PCx's cycle gadget so it displays 'Ports'. Tick the box to select 'COM Port 1', and set it to serial.device, Unit 0. Tick the second box below to select 'LPT1' and set this to parallel.device, unit 0.

6) Change PCx's cycle gadget so it displays 'Bios'. Click the BIOS file selecter button (it's a little folder icon). This brings up a requester. Select PCxBios from the requester.

7) Change PCx's cycle gadget so it displays 'Sound'. Set the PC Speaker volume to 64, DAC volume to 64, Sythesizer Volume to OFF.

8) Change PCx's cycle gadget so it displays 'Peripherals'. Set mouse emulation to 'Bus Mouse'.

9) Change PCx's cycle gadget so it display 'Advanced'. Change the Turbo Level to 2, set transcription to: x86 -> 680x0, and if you have plenty of memory, set the cache size to 1 megabyte. This ensures PC emulation is as fast as possible.

10) Change PCx's cycle gadget so it displays 'Configuration'. Click the 'Save Configuration' button. A requester pops up. Simply click 'Save' to save all settings.

Congratulations you now have PCx set up. You've still got a lot of work to do, since MS-DOS and Windows need to be installed, so let's get cracking...

CREATING A SYSTEM BOOT DISK:

A system boot disk needs to be prepared on a 'real' PC. To create a system disk, simply insert your copy of MS-DOS (disk 1) into a 'real' PC to boot into a bare MS-DOS shell, then insert a blank double-sided-double-density floppy disk and type:

FORMAT A: /S

This creates a system floppy disk and copies the essential files needed onto your floppy disk which you can boot from to start PCx to begin with. Ensure the MS-DOS 'Format' and 'FDisk' programs are present on your system disk: you need to copy these onto your system disk as well (you'll need to do that manually).

CREATING HARD DISK FILES:

I had to create my hard disk files with PCx. I choose a 40 megabyte C: system boot partition (for MS-DOS and Windows 3.1) and a 80 megabyte D: partition via two separate hardfiles (named MSHardfile0 and MSHardFile 1) under PCX. By using a hard disk file, you DO NOT need to reformat any Amiga partitions to MS-DOS. Instead PCx creates a large file in PCx HardFiles drawer which is just one big file which emulates a 'real' MS-DOS formatted hard disk under PC emulation. To see how to create a hard disk file, please refer to 'Configuring PCx' (above).

PREPARING AND FORMATTING YOUR HARD DISK FILES:

I started PCx and inserted an MS-DOS 6.22 bootable system disk which a friend had created for me (which also contained the FDisk program for preparing my PC partitions and the 'Format' program for formatting them (see 'Creating a System Boot Disk' to see how to create one).

Once your System Boot disk (you prepared earlier) has booted up, you will need to set up a primary DOS partition and extended DOS partition using the MS-DOS 'FDisk' program, so type FDisk [RETURN] and set up your primary DOS partition (drive C:) and your extended DOS partition (drive D:). Refer to your MSDOS user manual on how to use the 'FDisk' program.

With the partitions setup using the MS-DOS 'FDisk' program, FDisk prompts you to press the ESC key to restart MS-DOS. MS-DOS will now reboot from your system floppy disk. Once your system floppy disk has rebooted you will be rebooted into MS-DOS. You can now format your partitions by typing:-

Format C: /S [RETURN] (to format drive C: as a system drive), and: Format D: [RETURN] to format drive D:

After formatting each partition you'll be prompted to enter a volume name. I choose to name drive C: 'Boot' and drive D: as 'Data'.

Job done, your partitions are now set up and formatted ready for use. Onto the next step and to create a DOSDriver mountlist (see below):-

CREATING A DOSDRIVER TO MOUNT YOUR PC HARD FILES

CREATING A DOSDRIVER TO MOUNT YOUR PC HARD FILES:

Now that both partitions are formatted and ready for use, you will need to find some way of transferring DOS and Windows to drive C:. To do this, I quit PC emulation to return to Workbench, bought up PCx's hardfile setup and created a DOS driver for both hard disk files by clicking on the hard disk file I wanted to create a Dos-Driver mountlist for (listed in the 'Selected Devices' box, and then clicking 'Create DOS driver'. This creates a DosDriver mountlist for both drives C: and D: (which are named MSHardFile0 and MSHardfile1 respectively). These two dos-drivers are then automatically created in your SYS:Storage/DOSDrivers drawer.

Next, from the Amiga side, I mounted the MSHardFile0 Dos-driver in my SYS:STORAGE/DOSDRIVERS drawer by double-clicking it so I could mount drive C: via Workbench (you'll see an icon pop up on the Workbench). Once this is mounted, you can access your newly formatted MS-DOS partition(s) under Workbench, which makes copying, deleting files to and from your virtual PC drives a doddle.

From the Amiga side, I then inserted my PC formatted zip disk (which contained all the MS-DOS 6.22 disks in a drawer called 'DOS' and all the Windows 3.1 disks in a drawer called 'Win' to drive C: (Both aforementioned drawers were dragged across to my MSHardfile0 hard disk file: drive C:) via Workbench. Once both drawers had been copied across, it's necessary to reboot the Amiga, (since PCx will report a non-system disk error otherwise if the MSHardFile0 dos-driver is mounted).

Once the Amiga has rebooted, restart PCx. Click 'Start' to boot into MS-DOS again (you know longer need to boot from a system boot disk, as we have formatted our C: system drive under PCx earlier on. Now onto the fun bit... Your going to have to decompress all the MS-DOS commands by hand (see below):-

DECOMPRESSING ALL MS-DOS COMMANDS:

Once booted into MSDOS, all the MS-DOS commands need to be expanded (decompressed) by hand. To do this from MS-DOS type:

CD C:\DOS [RETURN] to change to the directory containing the MS-DOS commands, then type:-

DIR /P [RETURN].

You will see a directory listing of all the MS-DOS commands. There's a lot of them isn't there ? The bad news is that all of the MS-DOS commands ending with an underscore "_" are compressed and need to be decompressed. To do this you use the MS-DOS 'Expand' command. Here's an example on how to do this:-

EXPAND CONFIG.SY_ CONFIG.SYS [RETURN]

The above example reads the CONFIG.SY_ file and expands (unpacks) it as CONFIG.SYS. Once unpacked, you can delete the archived version which ends in an underscore (CONFIG.SY_). You will have to trawl through ALL the MS-DOS commands decompressing them in this way until they were ALL decompressed (which can take over a day to do!)

Once you have all decompressed all the MS-DOS commands, you can then install Windows (see below):-

INSTALLING WINDOWS 3.1:

Once ALL of the MS-DOS commands are decompressed (see above), it's time to reboot the PC (not the Amiga !) by doing the vulcan grip CTRL + ALT + DEL (to reboot your virtual PC into MS-DOS). Once booted into MS-DOS, Windows 3.1 needs to be installed.

It is recommended in Haage & Partner's 'PCx FAQ' (Frequently Asked Questions) if you are running any mode promotion software such as New Mode that redirect the screen) or MCP (Master Control Program) on your Amiga to temporarily disable these prior to installing Windows 3.1. Haage and partner state that such programs can upset the Windows 'Setup' program and cause it to lock up.

Now the fun bit, To install Windows 3.1 I typed:
C:\WIN\SETUP[RETURN]
This starts the Windows 'SetUp' program.

For the installation of Windows 3.1, I went for an 'Express' setup, which configures Windows to your machine. The whole installation of Windows 3.1 takes about 1 hour, so I suggest you go and make yourself a nice cuppa tea....

Towards the end of the installation process of Windows 3.1 you will be asked to specify what printer driver your printer uses. If your particular printer is not listed, select the 'Text/Generic' driver. You can always install the particular driver for your printer by running the Window's Control panel afterwards should you so wish.

STARTING WINDOWS:

Once Windows 3.1 is installed you'll want it to automatically start on boot-up, rather than being dumped into MS-DOS and having to start it manually. To accomplish this you'll need to edit your AUTOEXEC.BAT file on your system drive to start Windows. PCx 1.1 CAN NOT run Windows 3.1 in 386 enhanced mode, it is only capable of running Windows 3.1 in 'standard' mode. To launch Windows in 'standard' mode, this is done as follows:-

Include this in the last line of your AUTOEXEC.BAT file:-
Win/S

SETTING UP YOUR CD-ROM DRIVE UNDER WINDOWS:

You need to find out what device driver your CD-ROM drive uses under Workbench and the unit number of your drive. This can be obtained as follows:-

1) Open an AmigaDOS shell, and type:-

Multiview Devs:Dosdrivers/CD0 [RETURN]

This will bring up the mount-list for your CD-ROM drive (CD0). Write down the device name and unit number of your CD-ROM drive. (if your using CacheCDFS to mount your CD-ROM drive via Workbench the device driver name for your CD-ROM drive will be atapi.device). Once you have this information to hand, refer to PCx's documentation on how to install the PCXCD.SYS CD-ROM driver.

INSTALLING THE PCXANSI.SYS DRIVER:

I recommend you install The PCXANSI.SYS driver which comes with PCX. This is a direct replacement for the MS-DOS version of ANSI.SYS which gives a much faster ANSI text and graphic output in DOS programs. Refer to PCx's documentation on how to install this.

SOUNDBLASTER DRIVER:

PCx offers primitive sound blaster emulation, although to get that to work, I had to install the SoundBlaster v1 driver and associated files by copying the appropriate drivers to C:\WINDOWS\SYSTEM and firing up Windows 'Control panel' and launching the 'Driver' preferences to set this up. I can now play .WAV sound files straight from Windows. I can't really go into the installation procedure here as it's beyond the scope of this article and is quite complex. If in doubt, ask a friend with some PC expertise.

TIPS:

1) In order to save fragmenting important Amiga partitions when using hard disk files with PCx, I would suggest storing them on a separate partition. You will need to change the MSHF: assignment in your S:User-Startup file to point to the location of where your hardfiles are stored. Here is an example of how this is done:

Assign MSHF: DH3:HardFiles

This above example assigns PCX to look for your hardfiles on your DH3: partition in a drawer called 'HardFiles'. Dead simple...

2) To increase the speed of loading MS-DOS / Windows under PC emulation when using hard disk files with PCx, ensure your Amiga partition has plenty of buffers allocated (This can be done via the HDToolBox program or alternately, you can issue additional buffers to the allocated partition using the AmigaDOS 'Addbuffers' command).

3) To further increase the speed of loading MS-DOS / Windows under PC emulation when using hard disk files with PCx, I would recommend you also use Greed's Professional File System v3. This is a hell of a lot faster than Commodore's slow and buggy 'Fast-File-System' and will help to speed things up considerably.

4) If you find Windows / MS-DOS emulation is slow, you should set PCx's Advanced options to:-

Turbo Level=2
Transcription= x86 -> 680x0
Cache Size = 1 Mb

5) 8 megabytes of RAM is certainly no luxury for running Windows. If you have the memory, go to PCX's 'Memory' options, and wack the slider up to a full 15 megabytes of RAM as well.

6) Since PCx v1.1 is only capable of running Windows in 'standard mode', Windows needs to use 'swap' files when memory is low. Swap files are always saved in the 'C:\WINDOWS\TEMP' path.

'SMARTDrive' also provides "double-buffering" for hard disk controllers under Windows that cannot work with virtual memory. The Windows setup program places the following command in your CONFIG.SYS file in addition to the one placed in the AUTOEXEC.BAT file. The following command line is required for you to use the double-buffering feature of SMARTDrive. The command in your CONFIG.SYS file should read:

device=c:\windows\smartdrv.exe/double_buffer

Also ensure the Windows setup has added the follow command to your AUTOEXEC.BAT file as well.

C:\WINDOWS\SMARTDRV.EXE

If the above lines are not placed in your CONFIG.SYS and AUTOEXEC.BAT files by the Windows Setup program, then you will need to edit your AUTOEXEC.BAT and CONFIG.SYS files manually using an MS-DOS text editor such as 'Edit' and include them as I've described above. By enabling SmartDrive in this way, it will help to speed up things a little.

7) Be careful when exiting back to Workbench from PC emulation: Since 'Smart Drive' needs to save swap files continuously in low memory situations when running Windows in 'standard' mode, ensure ALL cache writing operations under MS-DOS via SMARTDrive have been completed before you exit PCx. To ensure this has happened, from Windows, double click on the MSDOSPrompt program in the 'Main' folder. This will return you to MS-DOS. Now type:-

smartdrv /c before exiting PCx. Failure to do this, and you may end up with your system drive containing MS-DOS and Windows 3.1 becoming corrupted resulting in a 'non-system-disk' error. Resulting in having to install MS-DOS and Windows all over again, which is why I recommend step 8...

8) Backup your two hard disk files (HardFile0 and HardFile1). By doing this, if your C: or D: drives screw up, you can just simply copy back your two PCx hard disk files (MSHardFile0 and MSHardFile1) to PCx's HardFiles drawer again, and will save the pain and misery of NT COLOR=blue> 8-)

9) PCx v1.1 is able to run PC programs via your graphics card, although the only mode that supports this is PCx's 'Mode13' which needs to be set up in Cybergraphic's Preferences. Mode13 is only capable of giving a graphics card resolution of 320x200. This mode is fine for running most MS-DOS based games with, but impracticable for running Windows (this mode is too small). You'll therefore have to put up with a 640x480 Hi-Res Laced screenmode when running Windows. Unless your Amiga is equipped with a scandoubler to 'delace' interlaced screen modes, prepare yourself for some serious eye strain when running Windows 3.1...

NOTE:

You CANNOT run the Workgroups version of Windows with PCx v1.1. This is because the Workgroups version of Windows cannot be started in 'real' or 'standard' modes. You will need Windows 3.1 to run under PCx. Other versions of Windows and DOS you *can* run with PCx are: Microsoft DOS, through to OS 2, Windows NT or Novell.

Being able to emulate a stock 386 PC can be most useful for particular tasks. If any of you need any assistance or have any further questions, I may be found on THE CRYPT mailing list: www.egroups.com/thecrypt.

SCREENGRABS:

I enclose some pictures of Windows 3.1 running on my Amiga courtesy of PCx. These are:-

Filemanager.iff: In this screengrab, I'm browsing through a CD-ROM listening to some .WAV sound files.

Main.iff: The main Windows desktop.

Solitaire.iff: The standard card game 'Solitaire' that is supplied with Windows 3.1.

FINAL WORDS:

I hope I have answered some of the key questions regarding setting up PCx. and PC emulation.

Craig 'Hercules' Daines
Technical Editor For THE CRYPT
Craig_Daines@excite.co.uk